package com.abcgroup.hyppo.loader;

import org.hibernate.cfg.Configuration;
import org.hibernate.Query;
import org.hibernate.engine.NamedQueryDefinition;

import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.io.FileNotFoundException;
import java.net.URL;

public interface IHibernateLoader {

    /**
     * 1. load all jars.
     * 2. init class loaders.
     * 3. lookup for all hib configs.
     * @param fileNames names                      
     * @throws java.io.FileNotFoundException  as
     */
    void init(URL[] fileNames, ClassLoader parent) throws FileNotFoundException;

    ClassLoader initClassLoader();

    List<String> getAvailableConfigs();

    void configureHibernate(List<String> confs);

    IHibernateLoader setProperty(String n, String v);

    Configuration getHibernateConfiguration();

    IHibernateLoader setProperties(Properties props);

    Set<String> getAllNamedQueries();

    NamedQueryDefinition getQueryDefinition(String name);
}
